package com.entity.servicedetails;

import com.baomidou.mybatisplus.annotation.*;
import com.config.CustomLocalDateTimeDeserializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("服务明细表Vo类")
public class ServiceDetailsVo {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "售后单号")
    @TableField("service_order_number")
    private String serviceOrderNumber;

    @ApiModelProperty(value = "售后单位（客户名）")
    @TableField("company_name")
    private String companyName;

    @ApiModelProperty(value = "开始时间")
    @TableField("start_time")
    @JsonDeserialize(using = CustomLocalDateTimeDeserializer.class)
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @TableField("end_time")
    @JsonDeserialize(using = CustomLocalDateTimeDeserializer.class)
    private LocalDateTime endTime;

    @ApiModelProperty(value = "服务天数和人员")
    @TableField("service_days")
    private List<servicePvo> serviceDays;

    @ApiModelProperty(value = "差旅费")
    @TableField("travel_expense")
    private Double travelExpense;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    @ApiModelProperty(value = "逻辑删除标识 1:正常 0:删除")
    @TableField("is_deleted")
    private Integer isDeleted = 1;
}
